public class Solution172 {
    public int trailingZeroes(int n) {
        int ans=0;
        while (n>0){
            ans+=n/5;
            n=n/5;
        }
        return ans;
    }

    public static void main(String[] args) {
        System.out.println(new Solution172().trailingZeroes(5));
    }
}
